import HTTP from '@/plugins/axios'
import { api } from '@/ts/enum'
import { dealRes, pageList } from '@/ts/type'
import { UserHealthDto } from '@/ts/type/User'
import { DealHealth } from '@/ts/type/Health'

const UserHealthService = class HealthService {
  static getHealthInfoByStatus(page: number, size: number) {
    return HTTP.get<dealRes<pageList<UserHealthDto>>>(`/${api.UHealthApi}/${page}/${size}`)
  }

  static postQuery(page: number, size: number, data: DealHealth) {
    return HTTP.post<dealRes<pageList<UserHealthDto>>>(`/${api.UHealthApi}/${page}/${size}`, data)
  }
}

export default UserHealthService